{% extends 'book/layout.html' %} {% block body %}
<div class="example">
	<article class="media">
		<div class="media-left">
			{% include 'book/_cover.html' %}
		</div>
		<div class="media-body">
			<h4 class="media-heading">{{ book.title }}</h4>
			{% if book.sub_title %}
			<h5>{{ book.sub_title }}</h5>
			{% endif %}
			by:{% for ba in book.authors.all %}
                <a class="author-name" href="{% url 'book:author' ba.slug %}">{{ ba.name }}</a>
            {% endfor %} 
			{% if book.isbn %}
			<div>
				<label>ISBN:</label>
				<span>{{book.isbn}}</span>
			</div>
			{% endif %}
			<div class="download-links">
				{% if book.formats %}
		            {% for fmt in book.formats %}
		            <a href="{{ fmt.download_url }}" target="_blank" rel="download">{{ fmt.file_format }}</a>
		            {% endfor %}
	            {% endif %}
			</div>
			<table>
				<tbody>
					<tr>
						<th>Year</th>
						<td>{{ book.year }}</td>
					</tr>
					<tr>
						<th></th>
						<td></td>
					</tr>
				</tbody>
			</table>
          
		</div>
	</article>
	<div class="article-summary">
		 {% if book.summary %}
            {{ book.summary|safe }}
        {% else %}
            <p>无</p>
        {% endif %}
	</div>
</div>
{% endblock %}